<!DOCTYPE html>
<?php session_start();?>

<html lang="en">

<?php
include '../config/config.inc';
include '../execute/auth.php';
?>
<?php 
$id=$_SESSION['USER_ID'];
?>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" href="assets/img/favicon.ico">
<link rel="stylesheet" href="../assets/css/style.css">
<title>Event Afghanistan</title>

<!-- Bootstrap core CSS -->
<link href="../assets/css/bootstrap.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="../assets/css/style.css" />

<!-- Custom styles for this template -->
<link href='http://fonts.googleapis.com/css?family=Lato:100,300,400'
	rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="../assets/css/animate.css" />
<link rel="stylesheet" type="text/css" href="../assets/css/elements.css" />
<link rel="stylesheet" type="text/css" href="../assets/css/custom.css" />
<link
	href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css"
	rel="stylesheet">
	<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />
	
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script>
$(function(){
	$(".editEvent").on("click",function(){
		$('#edit').modal();
		//jQuery.param.querystring(window.location.href,'valueA=321&valueB=123');
	});
});
</script>
</head>

<body>
<?php 
$conn = mysql_connect(DB_HOST,DB_USER,DB_PASSWORD);
if(!$conn){
	echo mysql_error();
}
$db=mysql_select_db(DB_DATABASE);
if(!$db){
	mysql_error();
}
				$qry = mysql_query("SELECT * FROM `user` where id='$id'");
				if ($qry){
					
					$so=mysql_fetch_array($qry);
				}?>
	<!-- Navbar
	============= -->
	<div class="navbar navbar-inverse navbar-fixed-top">
		<div class="container">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle" data-toggle="collapse"
					data-target=".navbar-collapse">
					<span class="icon-bar"></span> <span class="icon-bar"></span> <span
						class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="../index.php">Events </a>
			</div>
			<div class="collapse navbar-collapse">
				<ul class="nav navbar-nav">
					<li class="hidden-sm hidden-md"><a href="../index.php">Home</a>
					</li>
					<li class="hidden-sm hidden-md"><a href="../services.php">Services
					</a>
					</li>

					<li class="hidden-sm hidden-md"><a href="../calendar.php">Event
							Calendar </a>
					</li>
					<li class="hidden-sm hidden-md"><a href="../index.php">Voluntering
					</a>
					</li>
					<li class="hidden-sm hidden-md"><a href="../index.php">Resources </a>
					</li>
					<li class="hidden-sm hidden-md"><a href="../about-us.php">About</a>
					</li>
					<li class="hidden-sm hidden-md"><a href="../contact.php">Contact us</a>
					</li>
					<!-- Profile links for extra small screens -->
					<li class="visible-xs"><a href="../sign-in.php">Sign In</a>
					</li>
					<li class="visible-xs"><a href="#">Sign Out</a>
					</li>
				</ul>
				<!-- Search form for extra small screens -->
				<form class="navbar-form navbar-left visible-xs" role="search">
					<div class="form-group">
						<input type="text" class="form-control" placeholder="Search">
					</div>
					<button type="submit" class="hl-btn hl-btn-blue">Go!</button>
				</form>


				<ul class="nav navbar-nav navbar-right hidden-xs">
					<!-- Signed in. Profile Menu -->
					<li id="profile-menu" class="dropdown"><a href="#"
						class="dropdown-toggle" data-toggle="dropdown"><?php echo$so['fullname'] ;?> <b
							class="caret"></b> </a>
						<ul class="dropdown-menu">
							<li class="account">
								<div class="avatar"><img src="../assets/img/users/<?php echo $so['photo']; ?>" class="imgu"></div>
								<p>
								<br /><?php echo $so['email'];?>
								</p>
								<p>
									<a href="profile.php">Profile</a> | <a
										href="../execute/logout.php" id="sign-out">Sign out</a>
								</p>
								<div class="clearfix"></div>
							</li>
						</ul>
					</li>

				</ul>
			</div>
		</div>
	</div>

	 <div class="wrapper">
	  <div class="section-header">
	  <div class="container">
	    <div class="row">
	      <div class="col-sm-12">
		   
			<h1 class="animated slideInLeft"><span>Add New Event</span></h1>
		  </div>
		</div>
	  </div>
    </div>
    <div class="container">
	  <div class="row">
	    <!-- Profile Menu -->
		<div class="col-sm-4 col-md-3">
		  <div class="user-menu bottom-15">
		    <ul>
			  <li>
			    <a href="myevent.php" >
				  <i class="sign fa fa-bell-o" style="background-color:#ff4900;"></i> My Events <i class="fa fa-chevron-right pull-right"></i>
				</a>  
			  </li>
			  <li>
			    <a href="addevent.php" >
				  <i class="sign fa fa-plus-square fa-3x" style="background-color:#FE2E64;"></i> Add New Events <i class="fa fa-chevron-right pull-right"></i>
				</a>  
			  </li>
			  <li>
			    <a href="sponsorevent.php" >
				  <i class="sign fa fa-anchor" style="background-color:#49ADF5;"></i> Sponsor Events <i class="fa fa-chevron-right pull-right"></i>
				</a>  
			  </li>
			  <li>
			    <a href="exihabitevent.php" >
				  <i class="sign fa fa-desktop" style="background-color:#00cc00;"></i> Exihabit Events <i class="fa fa-chevron-right pull-right"></i>
				</a>  
			  </li>
			  <li>
			    <a href="joinevent.php" >
				  <i class="sign fa fa-group" style="background-color:#009E8E;"></i> Join Events<i class="fa fa-chevron-right pull-right"></i>
				</a>  
			  </li>
			 
			  <li>
			    <a href="profile.php" >
				  <i class="sign fa fa-user bg-amethyst"></i> My Profile <i class="fa fa-chevron-right pull-right"></i>
				</a>  
			  </li>
			  
			</ul>
			
		  </div>
		</div>
	<div class="container">
	<div class="bs-docs-section">
       <div class="col-sm-8 col-md-8">
            <div class="well">
              <form class="bs-example form-horizontal " action="execute/addevent.php" method="post" enctype="multipart/form-data">
                <fieldset>
                  <legend>Required field</legend>
                  <?php if(isset($_SESSION['ERROR_MSG'])){
	                        ?>
              <div class="alert alert-danger">
               <?php 
             if(is_array($_SESSION['ERROR_MSG'])){
	              foreach ($_SESSION['ERROR_MSG'] as $value) {
		                 echo $value."<br>";
	                    }
             }else {
	             mysql_error();
                     }
?>
</div>
<?php 
                  }
unset($_SESSION['ERROR_MSG']);
?>
<?php 
if(isset($_GET['status'])){
	?>
	 <div class="alert alert-success"> Your Event have been Successfuly save Us Thankyou  </div><?php }?>
                  <div class="form-group">
                    <label for="input" class="col-lg-2 control-label"> Title</label>
                    <div class="col-lg-9">
                      <input type="text" class="form-control" id="title" placeholder="Add Title of the Event" name="title">
                    </div>
                  </div>
                  <div class="form-group">
                    <label for="input" class="col-lg-2 control-label">Date </label>
                    <div class="col-lg-4">
                      <input type="text" class="form-control" id="sdate" name="sdate"placeholder=" Start Date">
                      </div>
                      <div class="col-lg-4">
                      <input type="text" class="form-control" id="edate" name="edate" placeholder=" End Date">
                      
                      </div>
                       </div>
                    <div class="form-group">
                    <label for="select" class="col-lg-2 control-label">  Category</label>
                    <div class="col-lg-9">
                    <select class="form-control" id="select" name="select">
                    <option>Chose a Categories </option>
                            <?php 
								$q=mysql_query("select * from categories");
								while($r=mysql_fetch_array($q)){?>
								<option value="<?php echo $r['cat_id']; ?>"><?php echo $r['name']; ?></option>
								   <?php 
							}?>
								   
                      </select>
                      <br>
                      
                    </div>
                  </div>
                  
                   <div class="form-group">
                    <label for="input" class="col-lg-2 control-label"> Venue</label>
                    <div class="col-lg-9">
                      <input type="text" class="form-control" id="venue" name="venue" placeholder="Add Title of the Event">
                    </div>
                  </div>
                  <div class="form-group">
                    <label for="textArea" class="col-lg-2 control-label">Discription</label>
                    <div class="col-lg-9">
                      <textarea class="form-control" rows="3" id="textarea" name="textarea"></textarea>
                     
                    </div>
                  </div>
                  
                     <div class="form-group">
                    <label class="col-lg-2 control-label">Photo about Event </label>
                    <div class="col-lg-9">
                      <input type="file" class="form-control"  id="photo" name="photo">
                      
                    </div>
                  </div>
              </fieldset>
                <fieldset>
                  <legend>Important Info</legend>
                  <div class="form-group">
                    <label  class="col-lg-2 control-label">Agenda </label>
                    <div class="col-lg-9">
                      <input type="file" class="form-control" id="file" name="file">
                    </div>
                  </div>
                  <div class="form-group">
                    <label for="input" class="col-lg-2 control-label">Speaker</label>
                    <div class="col-lg-9">
                      <input type="text" class="form-control" id="speakar" name="speakar" placeholder="Speakar Name">
                     </div>
                  </div>
                   <div class="form-group">
                    <label  class="col-lg-2 control-label">Partner </label>
                    <div class="col-lg-9">
                      <input type="text" class="form-control" id="partnar" name="partnar"  placeholder="Partnar Name">
                    </div>
                  </div>
                  <div class="form-group">
                    <label  class="col-lg-2 control-label">Sponsor</label>
                    <div class="col-lg-9">
                      <input type="text" class="form-control" id="sponsor" name="sponsor"  placeholder="Partner Name">
                    </div>
                  </div>
                  <div class="form-group">
                    <label  class="col-lg-2 control-label">Organizer </label>
                    <div class="col-lg-9">
                      <input type="text" class="form-control" id="organizer" name="organizer"  placeholder="organizer Name">
                    </div>
                  </div>
           </fieldset>
             <fieldset>
                  <legend>Optional</legend>
 <div class=" form-group">
<label  class="col-lg-7 control-label"> <input type="checkbox"  style="width: 20px;height: 20px;" name="exhibition" value="yes"> 1. Do you want tarnsalition services ? </label>
 </div>
<div class=" form-group">
<label  class="col-lg-7 control-label"> <input type="checkbox"  style="width: 20px;height: 20px;" name="sponsorevent" value="yes"> 2. Do want do some compay Sponsor your event ? </label>
  </div>               
  
               
<div class=" form-group">
<input type="submit" value="Post" class="btn btn-info btn-info-2x " name="submit"> 
 </div>  
              
  </fieldset>
  </form>              
  </div>
  </div>
  </div>
	
	</div></div>
	</div></div>
	<!-- Foooter
================== -->
	<footer>
		<div class="container">
			<div class="row">
				<!-- Contact Us 
		=================  -->
				<div class="col-sm-4">
					<div class="headline">
						<h3>Contact us</h3>
					</div>
					<div class="content">
						<p>TechNation <br>
						 Dunya Plaza<br>
          Shahid Abdul Haq Square 
         <br>
           Ground Floor <br>phone:0093 788 121 311<br /> Email: <a href="../http://www.technation.af">info@technation.af</a>
						</p>
					</div>
				</div>
				<!-- Social icons 
		===================== -->
				<div class="col-sm-4">
					<div class="headline">
						<h3>Go Social</h3>
					</div>
						<div class="col-md-10">
					<div class="content social">
						<p>Stay in touch with us:</p>
						<ul>
							<li><a href="../#"><i class="fa fa-twitter"></i>
							</a></li>
							<li><a href="../#"><i class="fa fa-facebook"></i>
							</a></li>
							<li><a href="../#"><i class="fa fa-pinterest"></i>
							</a></li>
							<li><a href="../#"><i class="fa fa-youtube"></i>
							</a></li>
							<li><a href="../#"><i class="fa fa-linkedin"></i>
							</a></li>
							<li><a href="../#"><i class="fa fa-google-plus"></i>
							</a></li>
						</ul>
						<div class="clearfix"></div>
					</div>
					<h5>Message Alert</h5>
					<div class="input-group">
				<label class="sr-only" for="subscribe-email"> </label>
				 <span class="input-group-addon"><img src="assets/img/flag.jpg"></span>
				<input type="text" class="form-control" id="phone"
				placeholder="your phone Number"> <span class="input-group-btn">
				<button type="submit" class="hl-btn hl-btn-default">send</button></span>
				</div></div></div>
				<!-- Subscribe 
		=============== -->
				<div class="col-sm-4">
					<div class="headline">
						<h3>Subscribe</h3>
					</div>
					<div class="content">
						<p>
							Enter your e-mail below to subscribe to our free newsletter.<br />We
							promise not to bother you often!
						</p>
						<form class="form" role="form">
							<div class="row">
								<div class="col-sm-8">
								
									<input type="text" class="form-control"id="name" placeholder="Enter your Name">
									
									
											<div class="clearfix"></div>
											<br>
											
									<div class="input-group">
										<label class="sr-only" for="subscribe-email">Email
											address</label> <input type="email" class="form-control"
											id="subscribe-email" placeholder="Enter email"> <span
											class="input-group-btn">
											<button type="submit" class="hl-btn hl-btn-default">OK</button>
										</span>
									</div>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</footer>

	<!-- Legal 
  ============= -->
	<div class="legal">
		<div class="container">
			<div class="row">
				<div class="col-sm-12">
					<p>
						&copy; The Events 2014. <a href="../#">Privacy Policy</a> | <a
							href="../#">Terms of Service</a>
					</p>
				</div>
			</div>
		</div>
	</div>
	
	<!-- Bootstrap core JavaScript
    ================================================== -->
	<!-- Placed at the end of the document so the pages load faster -->
	
	<script src="//code.jquery.com/jquery-1.9.1.js"></script>
   <script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
	<script src="../assets/js/bootstrap.min.js"></script>
	<script src="../assets/js/custom.js"></script>
	<script src="../assets/js/scrolltopcontrol.js"></script>
  
  <script type="text/javascript">
  $(function(){
    $( "#sdate" ).datepicker();
    $( "#edate" ).datepicker();
  });
  </script>
	<!-- Scroll to top javascript -->
</body>


</html>
